class Label extends squareObject{
  String caption = "";
  PFont font;
  Label(String id, float x, float y, String s){
    super(id, x, y, textWidth(s), 12);
    caption = s;
    font = createFont("Helvetica", 12);
  }
  Label(String id, float x, float y, String s, PFont f){
    super(id, x, y, textWidth(s), textAscent());
    caption = s;
    font = f;
  }
  
  void display(){
    textFont(font);
    text(caption, x, y);
  }
  
  void setCaption(String s){caption = s;}
}
